package judge.controller;

import api.domain.dto.JudgeSubmitDTO;
import api.domain.vo.UserQuestionResultVO;
import core.domain.Result;
import judge.service.IJudgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/judge")
public class JudgeController {

    @Autowired
    private IJudgeService judgeService;

    @PostMapping("doJudgeJavaCode")
    public Result<UserQuestionResultVO> doJudgeJavaCode(@RequestBody JudgeSubmitDTO judgeSubmitDTO){
        return Result.success(judgeService.doJudgeJavaCode(judgeSubmitDTO));
    }

}
